package com.twilight.SofaStream;

import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.DefaultHttpClient;

public class DownloadHttpClient extends DefaultHttpClient {
	private String login;
	private String password;
	public DownloadHttpClient(String u, String p) {
		super();
		login = u;
		password = p;
	}
	public CredentialsProvider createCredentialsProvider() {	
		CredentialsProvider cp = new BasicCredentialsProvider();
		cp.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(login, password));
		return cp;
	}
}
